#ifndef _OLED_H
#define _OLED_H
#include "img.h"
void print_singlenum(uint8_t num, int x, int y)
{
    if (num >= 10)
    {
        u8g2.setFont(u8g2_font_freedoomr25_tn); // choose a suitable font
        u8g2.setCursor(x, y + 30);
        u8g2.print(num); // write something to the internal memory
    }
    else
    {
        u8g2.setFont(u8g2_font_freedoomr25_tn); // choose a suitable font
        u8g2.setCursor(x, y + 30);
        u8g2.print("0"); // write something to the internal memory
        u8g2.setCursor(x + 22, y + 30);
        u8g2.print(num); // write something to the internal memory
    }
}

void print_twonum(unsigned int a, uint8_t x, uint8_t y)
{
    print_singlenum(a / 100, x, y);
    u8g2.setCursor(x + 40, y + 30);
    u8g2.print(":"); // write something to the internal memory
    print_singlenum(a % 100, x + 53, y);
}

void print_mainpage_wea_num(unsigned int num)
{
    // #define Sunny 1
    // #define Cloudy 3
    // #define Small_Rain 4
    // #define Moderate_Rain 5
    // #define Heavy_Rain 6
    // #define Wind 7

    switch (wea[0].code_day) // display icon depend on today weather code
    {
    case 0: // Sunny
    case 1:
    case 2:
    case 3:
    case 38:
        u8g2.clearBuffer(); // 清空缓冲区

        u8g2.drawXBMP(0, 7, 25, 25, sunny1);        // 绘制icon
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        print_twonum(num, 32, 6);             // 显示两位时间
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        u8g2.clearBuffer(); // 清空缓冲区

        u8g2.drawXBMP(0, 7, 25, 25, sunny2);        // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);

        u8g2.clearBuffer();                         // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, sunny3);        // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        break;
    case 32: // Wind:
    case 33:
    case 34:

        u8g2.clearBuffer();                         // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, wind1);         // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);

        u8g2.clearBuffer();                         // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, wind2);         // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);

        u8g2.clearBuffer();                         // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, wind3);         // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);

        u8g2.clearBuffer();                         // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, wind4);         // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        break;

    case 13: // Small_Rain:
    case 20: // 雨夹雪
    case 10:
    case 19:                                        // 冻雨
    case 22:                                        // light snow
        u8g2.clearBuffer();                         // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, small_rain1);   // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        u8g2.clearBuffer(); // 清空缓冲区

        u8g2.drawXBMP(0, 7, 25, 25, small_rain2);   // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        u8g2.clearBuffer(); // 清空缓冲区

        u8g2.drawXBMP(0, 7, 25, 25, small_rain3);   // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        u8g2.clearBuffer(); // 清空缓冲区

        u8g2.drawXBMP(0, 7, 25, 25, small_rain4);   // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        break;

    case 14:                                         // Moderate_Rain:
    case 23:                                         // moderate snow
        u8g2.clearBuffer();                          // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, moderate_rain1); // 绘制icon
        print_twonum(num, 32, 6);                    // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half);  // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);

        u8g2.clearBuffer();                          // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, moderate_rain2); // 绘制icon
        print_twonum(num, 32, 6);                    // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half);  // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);

        u8g2.clearBuffer();                          // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, moderate_rain3); // 绘制icon
        print_twonum(num, 32, 6);                    // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half);  // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);

        u8g2.clearBuffer();                          // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, moderate_rain4); // 绘制icon
        print_twonum(num, 32, 6);                    // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half);  // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        break;

    case 16: // Heavy_Rain:
    case 17:
    case 18:
    case 15:
    case 24: // heavy snow
    case 25:
        u8g2.clearBuffer();                         // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, heavy_rain1);   // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);

        u8g2.clearBuffer();                         // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, heavy_rain2);   // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);

        u8g2.clearBuffer();                         // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, heavy_rain3);   // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);

        u8g2.clearBuffer();                         // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, heavy_rain4);   // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        break;

    case 30:                                        // fog
    case 31:                                        // haze
        u8g2.clearBuffer();                         // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, fog);           // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        break;

    case 26: // dust
    case 27:
        u8g2.clearBuffer();                         // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, dust1);         // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);

        u8g2.clearBuffer();                         // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, dust2);         // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        u8g2.clearBuffer(); // 清空缓冲区

        u8g2.drawXBMP(0, 7, 25, 25, dust3);         // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        break;
    case 28:
    case 29: // duststorm

        u8g2.clearBuffer(); // 清空缓冲区

        u8g2.drawXBMP(0, 7, 25, 25, duststorm1);    // 绘制icon
        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        u8g2.clearBuffer(); // 清空缓冲区

        u8g2.drawXBMP(0, 7, 25, 25, duststorm2); // 绘制icon

        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        u8g2.clearBuffer(); // 清空缓冲区

        u8g2.drawXBMP(0, 7, 25, 25, duststorm3); // 绘制icon

        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        break;

    case 37: // cold

        u8g2.clearBuffer(); // 清空缓冲区

        u8g2.drawXBMP(0, 7, 25, 25, cold1); // 绘制icon

        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        u8g2.clearBuffer(); // 清空缓冲区

        u8g2.drawXBMP(0, 7, 25, 25, cold2); // 绘制icon

        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        u8g2.clearBuffer(); // 清空缓冲区

        u8g2.drawXBMP(0, 7, 25, 25, cold3); // 绘制icon

        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        break;
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
        u8g2.clearBuffer(); // 清空缓冲区

        u8g2.drawXBMP(0, 7, 25, 25, cloudy); // 绘制icon

        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        break;

    default:
        u8g2.clearBuffer();                   // 清空缓冲区
        u8g2.drawXBMP(0, 7, 25, 25, unknown); // 绘制icon

        print_twonum(num, 32, 6);                   // 显示两位时间
        u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
        if (wifi_state)
            u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI
        u8g2.sendBuffer();                    // 发送缓冲区到显示屏
        delay(50);
        break;
    }
}

void print_mainpage_md_num(unsigned int num)
{
    // 显示两位时间
    u8g2.clearBuffer(); // 清空缓冲区
    print_twonum(num, 32, 6);

    // 显示月 日
    u8g2.drawXBMP(16, 8, 12, 12, chatacteryue); // 月
    u8g2.drawXBMP(16, 20, 12, 12, chatacterri); // 日
    u8g2.setFont(u8g2_font_freedoomr10_tu);     // choose a suitable font
    if (time_now.month >= 10)
    {
        u8g2.setCursor(0, 22);
        u8g2.print(time_now.month);
        u8g2.setCursor(0, 34);
        u8g2.print(time_now.day);
    }
    else
    {
        u8g2.setCursor(0, 22);
        u8g2.print("0");
        u8g2.setCursor(8, 22);
        u8g2.print(time_now.month);
        u8g2.setCursor(0, 34);
        u8g2.print(time_now.day);
    }

    u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
    if (wifi_state)
        u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI

    u8g2.sendBuffer(); // 发送缓冲区到显示屏
}

void print_mainpage_charplaying()
{
    // 显示两位时间
    u8g2.clearBuffer(); // 清空缓冲区
    print_twonum(current_play_min * 100 + current_play_sec, 32, 6);
    // 显示播放状态
    u8g2.drawXBMP(0, 8, 12, 12, chatacterzhen);   // 正
    u8g2.drawXBMP(0, 20, 12, 12, chatacterbo);    // 播
    u8g2.drawXBMP(12, 8, 12, 12, chatacterzai);   // 在
    u8g2.drawXBMP(12, 20, 12, 12, chatacterfang); // 放
    // 显示现在时间提醒字眼
    // u8g2.drawXBMP(0, 8, 12, 12, chatacterxian);         // 现
    // u8g2.drawXBMP(0, 20, 12, 12, chatactershi_shijian); // 时
    // u8g2.drawXBMP(12, 8, 12, 12, chatacterzai);         // 在
    // u8g2.drawXBMP(12, 20, 12, 12, chatacterjian);       // 间

    u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
    if (wifi_state)
        u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI

    u8g2.sendBuffer(); // 发送缓冲区到显示屏
    delay(2000);
}

void print_mainpage_chartime()
{
    // 显示两位时间
    u8g2.clearBuffer(); // 清空缓冲区
    print_twonum(time_now.hour * 100 + time_now.min, 32, 6);

    // 显示播放状态
    //  u8g2.drawXBMP(0, 8, 12, 12, chatacterzhen);   // 正
    //  u8g2.drawXBMP(0, 20, 12, 12, chatacterbo);    // 播
    //  u8g2.drawXBMP(12, 8, 12, 12, chatacterzai);   // 在
    //  u8g2.drawXBMP(12, 20, 12, 12, chatacterfang); // 放
    // 显示现在时间提醒字眼
    u8g2.drawXBMP(0, 8, 12, 12, chatacterxian);         // 现
    u8g2.drawXBMP(0, 20, 12, 12, chatactershi_shijian); // 时
    u8g2.drawXBMP(12, 8, 12, 12, chatacterzai);         // 在
    u8g2.drawXBMP(12, 20, 12, 12, chatacterjian);       // 间

    u8g2.drawXBMP(110, 0, 15, 7, battery_half); // 绘制电池
    if (wifi_state)
        u8g2.drawXBMP(90, 0, 7, 7, WIFI); // 绘制WIFI

    u8g2.sendBuffer(); // 发送缓冲区到显示屏
    delay(2000);
}

void print_single(uint8_t code, int pos)
{
    u8g2.drawXBMP(pos, 2, 28, 28, character[code]);
    //  b0	多
    //  b1	云
    //  b2	雨
    //  b3	大
    //  b4	小
    //  b5	风
    //  b6	中
    //  b7	冰
    //  b8	冷
    //  b9	冻
    //  b10	夹
    //  b11	尘
    //  b12	强
    //  b13	扬
    //  b14	晴
    //  b15	暴
    //  b16	未
    //  b17	沙
    //  b18	浮
    //  b19	热
    //  b20	特
    //  b21	知
    //  b22	阴
    //  b23	阵
    //  b24	雪
    //  b25	雷
    //  b26	雹
    //  b27	雾
    //  b28	霾
    //  b29	飓
    //  b30	间
    //  b31	部
    //  b32	温
    //  b33	度
    //  b34	摄
    //  b35	氏
    //  b36	今
    //  b37	天
    //  b38	气
    // 39	明
    // 40	后
    // 41	最
    // 42	高
    // 43   低
}

void print_wea_unit(int pos)
{
    // x天天气xx,温度xx摄氏度，有xx
    //     晴 多云 x雨 x雪      大风

    u8g2.clearBuffer(); // 清空缓冲区
    pos += 28;
    switch (weather_to_broadcast)
    {
    case 0:
        print_single(36, pos); // 今
        break;
    case 1:
        print_single(39, pos); // 明
        break;
    case 2:
        print_single(40, pos); // 后
        break;
    }
    pos += 28;
    print_single(37, pos); // 天
    pos += 28;
    print_single(37, pos); // 天
    pos += 28;
    print_single(38, pos); // 气
    switch (wea[weather_to_broadcast].code_day)
    {
    case 0:
        pos += 28;
        print_single(14, pos);
        break; // 0: 晴
    case 1:
        pos += 28;
        print_single(14, pos);
        break; // 1: 晴
    case 2:
        pos += 28;
        print_single(14, pos);
        break; // 2: 晴
    case 3:
        pos += 28;
        print_single(14, pos);
        break; // 3: 晴
    case 4:
        pos += 28;
        print_single(0, pos);
        pos += 28;
        print_single(1, pos);
        break; // 4: 多云
    case 5:
        pos += 28;
        print_single(14, pos);
        pos += 28;
        print_single(30, pos);
        pos += 28;
        print_single(0, pos);
        pos += 28;
        print_single(1, pos);
        break; // 5: 晴间多云
    case 6:
        pos += 28;
        print_single(14, pos);
        pos += 28;
        print_single(30, pos);
        pos += 28;
        print_single(0, pos);
        pos += 28;
        print_single(1, pos);
        break; // 6: 晴间多云
    case 7:
        pos += 28;
        print_single(3, pos);
        pos += 28;
        print_single(31, pos);
        pos += 28;
        print_single(0, pos);
        pos += 28;
        print_single(1, pos);
        break; // 7: 大部多云
    case 8:
        pos += 28;
        print_single(3, pos);
        pos += 28;
        print_single(31, pos);
        pos += 28;
        print_single(0, pos);
        pos += 28;
        print_single(1, pos);
        break; // 8: 大部多云
    case 9:
        pos += 28;
        print_single(22, pos);
        break; // 9: 阴
    case 10:
        pos += 28;
        print_single(23, pos);
        pos += 28;
        print_single(2, pos);
        break; // 10: 阵雨
    case 11:
        pos += 28;
        print_single(25, pos);
        pos += 28;
        print_single(23, pos);
        pos += 28;
        print_single(2, pos);
        break; // 11: 雷阵雨
    case 12:
        pos += 28;
        print_single(25, pos);
        pos += 28;
        print_single(23, pos);
        pos += 28;
        print_single(2, pos);
        pos += 28;
        print_single(7, pos);
        pos += 28;
        print_single(26, pos);
        break; // 12: 雷阵雨伴有冰雹
    case 13:
        pos += 28;
        print_single(4, pos);
        pos += 28;
        print_single(2, pos);
        break; // 13: 小雨
    case 14:
        pos += 28;
        print_single(6, pos);
        pos += 28;
        print_single(2, pos);
        break; // 14: 中雨
    case 15:
        pos += 28;
        print_single(3, pos);
        pos += 28;
        print_single(2, pos);
        break; // 15: 大雨
    case 16:
        pos += 28;
        print_single(15, pos);
        pos += 28;
        print_single(2, pos);
        break; // 16: 暴雨
    case 17:
        pos += 28;
        print_single(3, pos);
        pos += 28;
        print_single(15, pos);
        pos += 28;
        print_single(2, pos);
        break; // 0: 大暴雨
    case 18:
        pos += 28;
        print_single(20, pos);
        pos += 28;
        print_single(3, pos);
        pos += 28;
        print_single(15, pos);
        pos += 28;
        print_single(2, pos);
        break; // 1: 特大暴雨
    case 19:
        pos += 28;
        print_single(9, pos);
        pos += 28;
        print_single(2, pos);
        break; // 2: 冻雨
    case 20:
        pos += 28;
        print_single(2, pos);
        pos += 28;
        print_single(10, pos);
        pos += 28;
        print_single(24, pos);
        break; // 3: 雨夹雪
    case 21:
        pos += 28;
        print_single(23, pos);
        pos += 28;
        print_single(24, pos);
        break; // 4: 阵雪
    case 22:
        pos += 28;
        print_single(4, pos);
        pos += 28;
        print_single(24, pos);
        break; // 22: 小雪
    case 23:
        pos += 28;
        print_single(6, pos);
        pos += 28;
        print_single(24, pos);
        break; // 23: 中雪
    case 24:
        pos += 28;
        print_single(3, pos);
        pos += 28;
        print_single(24, pos);
        break; // 24: 大雪
    case 25:
        pos += 28;
        print_single(15, pos);
        pos += 28;
        print_single(24, pos);
        break; // 25: 暴雪
    case 26:
        pos += 28;
        print_single(18, pos);
        pos += 28;
        print_single(11, pos);
        break; // 26: 浮尘
    case 27:
        pos += 28;
        print_single(13, pos);
        pos += 28;
        print_single(17, pos);
        break; // 27: 扬沙
    case 28:
        pos += 28;
        print_single(17, pos);
        pos += 28;
        print_single(11, pos);
        pos += 28;
        print_single(15, pos);
        break; // 28: 沙尘 暴
    case 29:
        pos += 28;
        print_single(12, pos);
        pos += 28;
        print_single(17, pos);
        pos += 28;
        print_single(11, pos);
        pos += 28;
        print_single(15, pos);
        break; // 29: 强沙尘暴
    case 30:
        pos += 28;
        print_single(27, pos);
        break; // 30: 雾
    case 31:
        pos += 28;
        print_single(28, pos);
        break; // 31: 霾
    case 32:
        pos += 28;
        print_single(5, pos);
        break; // 32: 风
    case 33:
        pos += 28;
        print_single(3, pos);
        pos += 28;
        print_single(5, pos);
        break; // 33: 大风
    case 34:
        pos += 28;
        print_single(29, pos);
        pos += 28;
        print_single(5, pos);
        break; // 34: 飓风
    case 35:
        pos += 28;
        print_single(19, pos);
        pos += 28;
        print_single(5, pos);
        pos += 28;
        print_single(15, pos);
        break; // 35: 热带 风暴
    case 36:
        pos += 28;
        print_single(5, pos);
        break; // 36: 龙卷风
    case 37:
        pos += 28;
        print_single(8, pos);
        break; // 37: 冷
    case 38:
        pos += 28;
        print_single(19, pos);
        break; // 38: 热
    case 99:
        pos += 28;
        print_single(16, pos);
        pos += 28;
        print_single(21, pos);
        break; // 99: 未知
    }
    pos += 28;
    print_single(41, pos); // 最
    pos += 28;
    print_single(42, pos); // 高
    pos += 28;
    print_single(32, pos); // 温
    pos += 28;
    print_single(33, pos); // 度
    pos += 28;
    print_singlenum(wea[weather_to_broadcast].high, pos, 0);
    pos += 48;
    print_single(34, pos); // 摄
    pos += 28;
    print_single(35, pos); // 氏
    pos += 28;
    print_single(33, pos); // 度

    pos += 28;
    print_single(41, pos); // 最
    pos += 28;
    print_single(43, pos); // 低
    pos += 28;
    print_single(32, pos); // 温
    pos += 28;
    print_single(33, pos); // 度
    pos += 28;
    print_singlenum(wea[weather_to_broadcast].low, pos, 0);
    pos += 48;
    print_single(34, pos); // 摄
    pos += 28;
    print_single(35, pos); // 氏
    pos += 28;
    print_single(33, pos); // 度

    u8g2.sendBuffer();
}

void print_weather()
{
    int pos;
    for (pos = 0; pos > -628; pos--)
    {
        print_wea_unit(pos);
        delay(6);
    }
}

void delay_print_weather(unsigned int delay_t, int *pos)
{
    unsigned int i;
    int pos_t = *pos;
    for (i = 0; i <= delay_t / 10; i++)
    {
        pos_t--;
        print_wea_unit(pos_t);
        delay(10);
    }
    *pos = pos_t;
}

#endif